package com.kindness.frate.activity;

import android.os.Bundle;
import android.os.Message;

import com.kindness.frate.R;
import com.kindness.frate.utils.immersionbar.ImmersionBar;
import com.kindness.frate.widget.autoscroll.AdvertisementObject;
import com.kindness.frate.widget.autoscroll.ScrollUpAdvertisementView;
import com.kindnesslibrary.base.BaseActivity;

import java.util.ArrayList;

public class AutoScrollActivity extends BaseActivity {

    private ArrayList<AdvertisementObject> mDataList = new ArrayList<AdvertisementObject>();
    ScrollUpAdvertisementView suav_auto_scroll;

    @Override
    protected void handlerMessage(Message msg) {

    }

    @Override
    protected int getLayout() {
        return R.layout.activity_auto_scroll_layout;
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        AdvertisementObject advertisementObject = new AdvertisementObject();
        advertisementObject.title = "爆";
        advertisementObject.info = "踏青零食上京东，百万零食1元秒";
        mDataList.add(advertisementObject);
        advertisementObject = new AdvertisementObject();
        advertisementObject.title = "公告";
        advertisementObject.info = "看老刘中国行，满129减50！";
        mDataList.add(advertisementObject);
        advertisementObject = new AdvertisementObject();
        advertisementObject.info = "高姿CC霜全渠道新品首发，领券199减50，点击查看";
        mDataList.add(advertisementObject);

        suav_auto_scroll = getView(R.id.suav_auto_scroll);
        suav_auto_scroll.setData(mDataList);
        suav_auto_scroll.setTextSize(12);
        suav_auto_scroll.setTimer(5000);
        suav_auto_scroll.start();

    }

    @Override
    protected void initEvent() {

    }
}
